@layout("/common/_container.html",{bg:"bg-white",js:["/assets/modular/system/datasource/datasource_update.js"]}){
<form id="datasourceForm" lay-filter="datasourceForm" class="layui-form model-form">

    <input name="id" value="${obj.id!}" type="hidden"/>


    <div class="layui-form-item">
       <label class="layui-form-label">名称<span style="color: red;">*</span></label>
       <div class="layui-input-block">
           <input value='${obj.name!}' name="name" placeholder="请输入名称" type="text" class="layui-input" lay-verify="required" required/>
       </div>
    </div>

    <div class="layui-form-item">
       <label class="layui-form-label">url<span style="color: red;">*</span></label>
       <div class="layui-input-block">
           <input value='${obj.url!}' name="url" placeholder="请输入url" type="text" class="layui-input" lay-verify="required" required/>
       </div>
    </div>

    <div class="layui-form-item">
       <label class="layui-form-label">驱动<span style="color: red;">*</span></label>
       <div class="layui-input-block">
           <input value='${obj.driver!}' name="driver" placeholder="请输入驱动" type="text" class="layui-input" lay-verify="required" required/>
       </div>
    </div>

    <div class="layui-form-item">
       <label class="layui-form-label">用户名<span style="color: red;">*</span></label>
       <div class="layui-input-block">
           <input value='${obj.username!}' name="username" placeholder="请输入用户名" type="text" class="layui-input" lay-verify="required" required/>
       </div>
    </div>

    <div class="layui-form-item">
       <label class="layui-form-label">密码<span style="color: red;">*</span></label>
       <div class="layui-input-block">
           <input value='${obj.password!}' name="password" placeholder="请输入密码" type="text" class="layui-input" lay-verify="required" required/>
       </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">状态<span style="color: red;">*</span></label>
        <div class="layui-input-block">
            <input type="radio" name="state" value="1" title="启用" ${obj.state! == 1 ? 'checked' : ''}>
            <input type="radio" name="state" value="0" title="禁用" ${obj.state! == 0 ? 'checked' : ''}>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">描述</label>
        <div class="layui-input-block">
            <textarea class="layui-textarea" name="descript">${obj.descript!}</textarea>
        </div>
    </div>


    <div class="layui-form-item text-right">
        <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button>
        <button class="layui-btn" lay-filter="btnSubmit" lay-submit>保存</button>
    </div>

</form>
@}